﻿using System;
using Conference.Server.DL;
using TeaLightV5.Foundation.Sal.DataRequests;
using TeaLightV5.Foundation.Sal.DataResponses;
using TeaLightV5.Foundation.Sal.Interfaces;
using TeaLightV5.Foundation.Server.DataSchema;
using TeaLightV5.Foundation.Server.Synchronization;

namespace Conference.Server.Synchronization
{
    public abstract class SyncEntityObject<TDto, TRdto, TQdto, TE>  : SyncObject<TDto, TRdto, TQdto, TE, Guid>
        where TDto : IServiceObject<Guid>, new()
        where TRdto : DataResponse<TDto>, new()
        where TQdto : DataRequest<TDto>
        where TE : class, IEntity<Guid>, ISyncableEntity, new()
    {
        protected SyncEntityObject(string entitySetName) : base(entitySetName)
        {
        }

        protected override DbContextBase<Guid> CreateContext()
        {
            return new Entities();
        }
    }
}
